home *** CD-ROM | disk | FTP | other *** search
/ Apple Chronicle / Apple Chronicle (CDWM1023150)(Apple Computer)(1992).iso / FrameMaker / 4D-Frame Connection / DBP Demo / Demo Script < prev    next >
Text File  |  1991-11-25  |  11KB  |  147 lines

  1. Here is a step-by-step demo script for  4D/Frame Connection. The demo uses the example database in this folder.
  2. (Note: For complete information about 4D/Frame connection, refer to the documentation in the 4D/Frame Docs ƒ file.)
  3.  
  4. The demo requires the following software package:
  5.  
  6. FrameMaker version 3.0 or greater
  7.  
  8. The following files:
  9.  
  10. DBP 1.4.DEMO.comp ∫ — an example 4th Dimension (4D) database shipped in compressed form
  11. DBP 1.4.data — the data file belonging to DBP 1.4.comp
  12. Script List — the saved script file used by 4D/Frame Connection
  13. DBP Template — a FrameMaker template document that will be used to format the data that is published by 4th Dimension
  14.  
  15. Steps:
  16.  
  17. 1. Double-click the DBP 1.4.DEMO.comp icon.
  18. 4th Dimension launches. This database contains five company records and an abbreviated list of products that these companies sell.
  19.  
  20. Note: If 4th Dimension asks for the data file the first time you launch the example database, open “DBP 1.4.data.” It will never ask for the data file again.
  21.  
  22. 2. Double-click ACIUS, Inc.
  23. 4th Dimension displays a data entry screen. This shows some of the information to be published. Note that there is a picture field with the company’s icon. At the bottom of the screen there is a list of products.
  24.  
  25. The list of products displays records from another file (table) in the database, the Products file. The user can enter an unlimited number of products for each company.
  26.  
  27. 3. Put the insertion point in “4th DIMENSION” inside the list at the bottom of the screen. 
  28. You should see a blinking arrow at the top-left corner of the scrollable area.
  29.  
  30. 4. Double-click when the insertion point is in “4th DIMENSION.”
  31. 4D displays the entry screen for the 4th Dimension product. You are now in the Products file (table) and looking at an entry screen for the 4th Dimension product.
  32. Note that there is a text field with several paragraphs of information about each product and a Cost field.
  33.  
  34. 5. Click Cancel (the large “X” at the top left) to return to the Companies file (table).
  35.  
  36. You can display records for other companies by clicking any of the arrow buttons at the top right part of the window. 
  37.  
  38. 6. Click Cancel again to return to the list of companies.
  39.  
  40. We are now ready to publish this information. We will publish a company directory; each company listing will include information from all of its products, i.e., info from the Products table.
  41.  
  42. 7. Choose Database Publishing from the DBP menu.
  43.  
  44. 4D displays the main screen from the database publishing module. 
  45.  
  46. The database publishing module is a portable dialog box that can be pasted into any 4th Dimension database. It will automatically read the database structure of the host database and properly display the correct files and fields.
  47.  
  48. 8. Click Load to load a prewritten script for database publishing.
  49. 4D displays an open-file dialog box. 
  50.  
  51. 9. Open the “Script List” document.
  52. 4D opens the document and fills in the names of scripts in the Script List area of the main dialog box.
  53. Each script in the script list contains directions for exporting information from the database. 
  54. Three types of material can be exported: 
  55.  
  56. • Paragraphs (text — fields and text constants)
  57.  
  58. • Index markers
  59.  
  60. • Graphics (picture fields)
  61.  
  62. You create new scripts by clicking the Paragraph, Marker, or Frame buttons on the right. You manage existing scripts using the Delete, Modify, Up, and Down buttons.
  63.  
  64. When you export information to FrameMaker, the database publisher runs the scripts in the order that they are listed in the script list, once for each record in the Master file. (The Master file is selected from the pop-up menu at the bottom of the screen.)
  65.  
  66. 10. Highlight “Co Name” in list and click Modify.
  67. The Paragraph script dialog is displayed. It contains scrollable lists of paragraph tags, field names, and operators. 
  68.  
  69. Paragraph tags are the tags used in the FrameMaker template that you will use to format the document. 
  70.  
  71. Field names are the names of the fields in the file listed at the top of the area. You can change files by clicking on the arrows on either side of the file name. 
  72.  
  73. Operators are miscellaneous operators that you can use in paragraph scripts. Operators include: Return and Tab characters, character overrides (bold, italic, and so forth), and built-in functions for handling missing data and relational operations.
  74.  
  75. This script exports the company name field and applies the “Head” paragraph tag.
  76.  
  77. You can build the script yourself by selecting the text in the area at the bottom and pressing the Delete key to erase the script. Then click “Head” in the first column, “Co_Name” in the second column, and “Return” in the third column. Then click Done to return to the main screen.
  78.  
  79. Here is a description of a script that uses numeric formating and some of the keywords in the operators area:
  80. At the main screen, highlight the “R & D Budget” script and click Modify. This script uses character overrides and a Tab (found in the Operators area). It also uses a numeric field (rather than a text field) and applies a dollar format using the built in String function (If a user selects a field that is numeric, date, time, or Boolean [true, false]) the database publisher automatically uses the String function that converts the contents of the field to text and lets the user apply a format. See the documentation for more information. )
  81.  
  82. Here is a description of another complex script.
  83. Select the Products script list and click Modify. This is an advanced script that uses the Get Many operator. This operator performs a Relate Many operation (4D terminology) or a “Join” (DBMS terminology). It retrieves the list of products from the product table that belongs to each company. (See the documentation for a description of the Get Many syntax.) Note that this script uses two fields from the Products file and applies different paragraph tags to each. In the database, there are two products associated with ACIUS and several products associated with Microsoft and GM.
  84.  
  85. 11. Highlight Co Marker in the Script List and click Modify.
  86. This screen lets you create index markers in your document. With the Marker Script dialog,  you can create index markers from the database and then generate the indexes automatically using the Generate command in FrameMaker.
  87. This screen creates an index entry for company name. It works like the Marker window in FrameMaker, except that a list of fields has been added. 
  88. To create an index marker for each record, click the type of marker in the list on the left. It highlights, just like in FrameMaker. Then create the index entry in the entry area at the bottom. Generally,  you will use field names, so that the text of the marker changes with each record. You can use all the features of the marker language that are available from FrameMaker, including:
  89. • multi-level index entries
  90. • optional sort order
  91. • variables such as $startrange and $endrange
  92. • character tags
  93.  
  94. See the documentation for more information.
  95.  
  96. 12. Click Done to go back to the main screen.
  97.  
  98. 13. Highlight “Co Picture” in the Script List and click Modify.
  99. This is a sample Frame script.
  100. 4D displays the Frame Script dialog box, used for creating anchored frames and exporting picture fields to FrameMaker. 
  101. The database publisher writes the contents of picture fields to disk, stores them as PICT2 documents, creates an anchored frame in FrameMaker for each record, and imports the correct PICT2 file into the frame.
  102. Note the pop-up menus at the top which are used to specify the type and alignment of anchored frames, and the Auto Size checkbox, which autosizes the frame to fit the picture field.
  103. The Frame Type and Align pop-ups contain the same options as in the FrameMaker anchored frame dialog box. Note that deselecting  Auto Size makes the Height and Width areas active. Leave the Auto Size checkbox checked.
  104.  
  105. 14. The three pop-up menus in the Export graphic area perform the following functions.
  106.  
  107. The left one is a list of files in the database. Select the file that contains the picture field you want to export.
  108. The middle one is a list of picture fields in the selected file. Only picture fields are listed. Select the picture field you want.
  109. The right one is a list of all fields in the selected file. You need to pick the “key field” — the field that uniquely identifies each record in the selected file. The database publisher uses the contents of this field to name the PICT2 files. Each PICT2 file must have a unique name so that FrameMaker can match each PICT2 file with the correct anchored frame.
  110.  
  111. 15. Click the Set Image Path button to set the path for the PICT2 file.
  112. This option tells the database publisher where on your hard disk to write the PICT2 files and where FrameMaker will find them.
  113. 4D displays an open file dialog box. 
  114.  
  115. 16. Highlight a file in the folder you want to store the PICT2 files in and click Open. (You must pick a file that is not currently open. If you try to open a file that is already open, you will get an error message.)
  116.  
  117. NOTE: You MUST set the image path the first time you move the files to a new hard disk. The Script List document remembers the last image path it was given, which may specify the name of a hard disk you don’t have.
  118.  
  119. 17. Click Done on the Create Frame dialog box.
  120. 4D returns you to the main screen.
  121.  
  122. 18. Set the Master file pop-up menu to Companies. 
  123. This tells 4D/Frame Connection to export all the records in the current selection in the Companies file (table).
  124.  
  125. 19. Click the Export button.
  126. 4D displays a save-file dialog box.
  127.  
  128. 20. Enter a name for the export file and click Save.
  129. 4D exports the company and product information.
  130.  
  131. 21. Click Done and open FrameMaker.
  132.  
  133. 22. Open the document you created in step 19 above.
  134. The document is opened as a generic document  because paragraph formats and master page information have not yet been provided. You need a template for this.
  135. [Optional: You may want to inspect the text file that 4D/Frame Connection created. To do this, hold down the Option key and open the file in FrameMaker. Or open the file with any word processor or text editor. You will note that 4D/Frame Connection has added a header and the appropriate markup codes.]
  136.  
  137. 23. Open the document “DBP Template.”
  138. This template specifies a two-column layout and puts each company name at the top of a column.
  139.  
  140. 24. Switch to the document you opened in step 22 and choose Use Formats From from the File menu. Select the “DBP Template” document as the template,  leave all checkboxes checked, and click OK.
  141.  
  142. 25. FrameMaker reformats the document in a 2-column layout. 
  143. Note that: the document includes tabs, character overrides within a paragraph (R & D Budget paragraph), graphics, multiple product listings per company (ACIUS, GM, and Microsoft), suppression of blank line for missing data in address. (there are two address fields, the second one is blank in the FrameMaker address.)
  144.  
  145. That’s it.
  146.  
  147.